package vip.xiaonuo.modular.manage.tsdatarecord.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import vip.xiaonuo.core.pojo.base.entity.BaseEntity;
import vip.xiaonuo.modular.manage.biindextype.entity.BaseDataTitleRelevance;

import java.util.List;
import java.util.Map;

/**
 * DefineDataRecord
 *
 * @author JackLee
 * 2022/8/25 18:30
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("base_data_define")
public class BaseDataDefine extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 文件记录id
     */
    private Long recordId;

    /**
     * 空间地理数据类型
     * 0点  1面
     */
    private Integer type;

    /**
     * 数据类型编码
     * @see BaseDataType
     */
    private String typeCode;

    /**
     * 时间信息
     */
    private Boolean isColumnTime;

    private String timeLevel;

    private Long timeColumnTableId;

    private String time;

    /**
     * 经度对应的表格id
     */
    private Long lngColumnTableId;

    @TableField(exist = false)
    private String lngDataIndex;

    /**
     * 纬度对应的表格id
     */
    private Long latColumnTableId;

    @TableField(exist = false)
    private String latDataIndex;

    /**
     * 对应的面数据 表格id
     */
    private Long coverColumnTableId;

    @TableField(exist = false)
    private String coverDataIndex;

    /**
     * 指标 与 字段对应
     */
    @TableField(exist = false)
    private List<BaseDataTitleRelevance> relevanceList;

    @Data
    @AllArgsConstructor
    public static class TimeWrapper {
        private String year;

        private String month;

        private String day;
    }

}
